package com.jianjun.ktui

import androidx.compose.material3.CalendarLocale
import androidx.compose.material3.ExperimentalMaterial3Api
import platform.Foundation.NSLocale
import platform.Foundation.preferredLanguages
import platform.UIKit.UIDevice

class IOSPlatform: Platform {
    override val name: String = UIDevice.currentDevice.systemName() + " " + UIDevice.currentDevice.systemVersion
}

actual fun getPlatform(): Platform = IOSPlatform()
actual suspend fun <T> httpRuoYi(
    path: String,
    params: MutableMap<String, Any>,
    method: Method
): T {
    TODO("Not yet implemented")
}

@OptIn(markerClass = [ExperimentalMaterial3Api::class])
actual fun defaultLocale(): CalendarLocale {
    return NSLocale(
        NSLocale.preferredLanguages.first() as String
    )
}